package cn.lili.modules.system.client;

import cn.lili.modules.constant.ServiceConstant;
import cn.lili.modules.system.entity.dos.RegionQdd;
import cn.lili.modules.system.fallback.RegionQddFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(path = "${server.servlet.context-path}", name = ServiceConstant.SYSTEM_SERVICE, contextId = "regionQdd", fallback = RegionQddFallback.class)
public interface RegionQddClient {

    /**
     * 根据地址Code获取地址
     *
     * @param code
     */
    @GetMapping("/feign/region/qdd/{code}")
    RegionQdd getRegionQdd(@PathVariable("code") String code);

    /**
     * 根据 商城地址ID  查询 企叮咚地址
     *
     * @param reginId 商城地址ID
     */
    @GetMapping("/feign/region/qdd/byid/{reginId}")
    RegionQdd getRegionQddById(@PathVariable("reginId") String reginId);
}
